home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Netware Super Library
/
Netware Super Library.iso
/
printing
/
iprint
/
tstnovel.c
< prev
Wrap
Text File
|
1990-03-13
|
2KB
|
29 lines
/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- */
/* Program : tstnovel.obj */
/* Author : Marc Chauffour */
/* Date-written : 03/13/90 09:14am */
/* Last-updated : */
/* */
/* Update :
/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- */
/* test si novell est charge ou non : Utilise le service 0DCh de l'interrupt*/
/* DOS 21h */
/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- */
#define NETWARE 0xDC /* Get shell Table Adresses */
#include <dos.h>
int testnovell( void ) /* Test si novell est charge */
{
union REGS regs; /* definition des registres */
struct SREGS sregs; /* Segment register */
char work; /* connection ID regenere */
regs.h.ah = NETWARE; /* fonction novell */
intdosx(®s,®s,&sregs); /* interruption dos */
if (regs.x.cflag || regs.h.al==0) return(-1); /* si on a des problemes */
work=(regs.h.cl > '9' ? regs.h.cl-'A'+10:regs.h.cl-'0')*16 +
(regs.h.ch > '9' ? regs.h.ch-'A'+10:regs.h.ch-'0');
return(work==regs.h.al ? 0 : -1);
}